BinPatch V1.7 (8. official release for DOS, Win95, NT, OS/2 and Linux on 19.6.97) 

 1. What is BinPatch?
 2. The licence
 3. Praxis examples of BinPatch usage
 4. Other usages of BinPatch
 5. Requirements
 6. Registration
 7. Sources for BinPatch
 8. Distributions  9. History 10. Planed features 11. Quickstart guide 12. Tips&Tricks 13. Possible problems 14. Platform specifics 15. Bugreports 16. Thanks to ...

1. What is BinPatch ? 

The name BinPatch describes my software-package to generate and apply patches on binary files of any kind. One program named GenPatch can be used to generate a so-called patchfile from two different version of a file (or from two complete directory structures). That patchfile serves another program called DoPatch to transform a given version of a file or whole program directory into another one. This usually makes sense when talking about Software-Updates.

When you compare a compressed patchfile against the complete new versions in terms of filesize, you see the point in using BinPatch. No compressor can nearly achieve those fantastic rates that can be achived using BinPatch for updating files. Esp. program files, texts and databases show up with extremly good rates when patched (see also "Praxis examples of BinPatch usage".) 

Background: Normally their is only little change in programs for newer versions. Only parts are revised and most parts remains (allmost) unchanged. Also huge parts of modern programs are made up from libraries, that rarely change and especially windows-programs have a huge nearly constant part. Try and see how much BinPatch can save with these.

Caveats: Only thing you habe to worry about, is that BinPatch can not work with compressed or crypted data. Allways use normal software installations instead of archives of packers. Unpack those before operating.. Also programs may be packed internally. You will recognize this from packers gaining only little when packing these files. (Unfortunately packers generate completely different archives even with similare data, so BinPatch can't do its' job with them.)

Hints: Packing the generated patchfile is completly Ok, esp. because GenPatch is optimized to generate patchfiles, which are bigger than neccessary, but will be smaller when packed! This is much of the secret of BinPatch's power compared with other patching tools.) 

Especially concerning software-updates, BinPatch has established as a good service. It saves a lot of time and money for the customers receiving Bugfixes or newer versions. Why should your customers, beta-testers or friends receive lots of Megabytes, where you could send them a few Kilobytes?

The patching stuff has come to (my) knowledge by the Unix-program "diff", which does a similar job, but is restricted to text files. BinPatch isn't restricted like this. (BTW: It's universaltity doesn't hinder BinPatch from being better for text files that "diff", it sure is! See "Praxis examples of BinPatch usage")
 


2. The BinPatch licence

The usage of the computer program package "BinPatch" is only allowed respecting the following terms. The User accepts these terms by using the program package. Talking of "BinPatch" means the programs "GenPatch" and "DoPatch" as well as the documentation in all formats and on all platforms. Please read this chapter completly.

a) It is my expressed wish, that this release shall be spread in the unregistered Version. 

When spreading BinPatch, only complete (esp. including this file) and unmodified versions are allowed. It would be best to keep the original archive file, to give it to others. As an exception to this rule, it is allowed to put DoPatch together with a patchfile, but not including this file within it means taking full response for it, so you have to disclaim it in the documentation coming along with it.

b) Spreading keyfiles for BinPatch is not allowed. Usage of keyfiles, which is not yours also. Only exception is when creating patches for your company, which registered BinPatch.

c) It is forbidden to modify BinPatch in any other way than applying patches created for it by Kay Hayen. Nobody else may generate patches for BinPatch. If you want to have BinPatch translated in other languages, please contact me to cooperate in this job. 

d) If you want to translate BinPatch into another language, please email me. Only official translations shall be released.

e) The non-commercial usage of BinPatch is allowed without registration. But users are welcome to register BinPatch if they like it. 

f) The commercial usage of GenPatch is not allowed without prior registration. Usage is commercial, if the patched data is of commercial kind or when shareware is being patched. It' never allowed to generated and distribute Patches for commercial data or shareware of other authors or firms. This may only be done by the author himself and of course only using his registered version of BinPatch. Applying patches will be Ok as long as the patch does not violate any licence term. Licence for commercial usage has to be bought and comes into effect with the installation of the keyfile only. The single user licence covers commercial usage of a single person or company with up to 5 employees only. Site licence is for all company or organisation's employees in a radius of 100miles and word-wide licence is the same for this whole planet.

g) A registration of a company may not be used by employees for their own projects. Other way round, companies may not use employees keyfiles for their projects. They both have to register in order to use BinPatch for commercial applications. 

h) It is forbidden to reverse-engineer, discompile or disassemble BinPatch or parts of it. Also it's forbidden to produce products that base on BinPatch without the explicit allowing of Kay Hayen <KayHayen@bigfoot.com>. 

i) The author is optimistic that BinPatch will fullfill some use, but the only thing guarantued, is that it will consume space on hard disks. The software may be used within the terms of this license, but only as-is! No special function is guarantued! For damage through using BinPatch there is no responsibility by the author! Also the author does not claim any rights on files generated using BinPatch, but won't take responsibility for their contents too.

j) BinPatch is © 1997 by Kay Hayen.


3. Praxis examples of BinPatch usage 

The advantage of Binpatch compared to sending complete versions all the time can be made clear with some examples:

Most examples concern: United-Edition (a PBEM, I'm developing at the moment.) 

A complete release as a packed archive is currently about 570k. Quite a few bytes.... Now image to send this out to somebody via mail to somebody in the internet. Because of current internet standards, you may have to 'encode' the archive, so it may be even 760k to be transmitted and payed, by both! 

Example A: Minor-bugfix. I had not localized some german texts in a demo, which I send a English friend. Now I didn't want him to cope with the German texts and changed them. But the demo was out, so what did I? Yes, I typed:

GENPATCH UNITED41 UNITED42 UPDATE 

and generated a 5.7k file named "UPDATE.UTP". Small, is it? But it's not even packed! By packing, I managed to reduce it further to 2.7k making a 3.6k email I sent out. This is so less, that even short explanations for the German terms would have been much longer. See the difference between 760k und 3.6k! In percent this was only 0.9%, very little, isn't it?

And my friend only needed to type  "DOPATCH UPDATE.UTP UCLIENT"  and right away, his version was enhanced and much more useable to him! 

Example B: Major-bugfix. I sent another friend an update after a couple of time, which contained many little changes and some new features. But also here, BinPatch succeded to reduce the filesize dramatically. The patchfile was only about 35k bringen, which was still less than 8% of the normal filesize and a big email traffic saver for me and him. 

Example C: Simple bugfix on a early test-version of GenPatch. By accident it was unable to process complete directory structures at once, there was only a "not" at a wrong place. Removing this meant only 260 Bytes! (May be a more today, since I've introduced a lot parameters to receive smallest results with bigger files in later versions)

Example D: Release compression: Some early BinPatch releases did not contain a GenPatch, but rather a patchfile that would generate it from DoPatch. This was possible, because the two programs shared some overhead. The distribution archieve size was reduced to only 47k instead of 74k! This application is not very typical, but it shows a additional potential of BinPatch. (Later releases reacted to the fact that GenPatch und DoPatch have completely different requirements on the compiler side, so a patch wouldn't be making to much sense any more.) 

Example E: A nice beta tester discovered some incorrect links in the files of the HTML documentation. After correcting them he sent me a patch (only 610 Bytes!) that corrected the both mistakes in my documentation.

Summary: The ideal application for BinPatch is the betatest of complex software over internet. Here BinPatch may show what it's power is. No matter if bugfixes oder real upgrades, BinPatch is also a way to provide better custom support via WWW. Who ever downloaded a 1.4M archiv from a slow server will know, how glad he'd have been, if there would have bee a only 100K update to be downloaded alternativly. (Note how often the transmission stops after about 1.3M....)


4. Other usages of BinPatch 

Through a special option you can instruct GenPatch to try and take advantage of redundacy in the newer version of a file. This does not allways give benefit compared to a patch without this, most of the time it will be a bigger patch after packing. But data that is known to be rather redudant may be packed better, when you use GenPatch to make a patch from an empty file to it. For such files, you may use BinPatch as a prepacker.  

When unpacking, you first unpack the patch and then give DoPatch a empty file to regenerate the complete file. What you may espect from this procedure differs from file to file, a try is it worth and later versions of BinPatch will allow this without using empty files.

When distributing a program package compiled with the same compiler, you may reduce the compiler overhead by generating other programs from one. That way, you only transfer common things once. See also Example D above.

If you want to release different (e.g. language) version of your program or a file, then BinPatch offers the option to distribute patches instead of completely "new" versions.


5. Requirements 

DOS/Windows 3.1:

The GenPatch.EXE for DOS requires a 386er and a DPMI-Server vorraus. Don't worry about the last, you fullfill this allready, when you are using a DOS-Box of Windows or OS/2. Alternatively you may use QEMM or the free DPMI-Server CWSDPMI.

The DoPatch.EXE for DOS requires only DOS and a 286 or higher. There are almost no memory needs. It has been developed to run out of the box on any DOS computer, without the users needing any knowledge.

The difference in these requirements come from the very complex job that GenPatch has to do, but also come from my personal aim to have DoPatch runable by everyone. The GenPatch is more targeted to developers and experienced users, where a 386 and DPMI shouldn't be too much aksed for. 

Windows 95:

The DoPat95.EXE will only run in the DOS-Box of Windows 95. When patches are to be executed in MS-DOS mode of Windows 95, it's neccessary to use the DoPatch.EXE for DOS/Windows 3.1. 

Windows NT:

Nothing special.

OS/2: 

This version run with OS/2 V2 and higher. Has been tested with OS/2 2.1, Warp 3 Fixpack 26 and Warp 4.

Linux:

The programs require ELF-libraries installed. A version for aout-Linux is planned.


6. Registration 

If you like BinPatch, you can - for commercial usage you must - register BinPatch. You have several options to do so. Those are listed in BinPatch registration and includes use of the Register.EXE that comes with BinPatch and online registration via credit card at Kagi.

The prices for registration are:

Price Licence type Licence description

25 US$

single user One single person

500 US$

site licence All employees at a company-site
in a 100 miles radius
5000 US$ word-wide All employees of a company
world-wide


As stated above BinPatch is free for non-commercial usage, but let me tell you, that I've spent a lot of effort, to make BinPatch as efficient and comfortable as possible and that I'll continue this in the future too. This is what you get:

Your personal BinPatch registration key. People can see, that you have created the patch.
Registering now includes all later updates
You receive bugfixes and new releases for one selected platform per email
A really good product
!

Note: With the release of a newer versions of BinPatch this offer no longer exists. Look for the newest version of this document in one of the BinPatch sources.

Note: A site or word-wide licence will only to apply to products of the registered company. No employee may use that licence for his own projects.


7. Sources for BinPatch 

The following sources for BinPatch will have the newest versions of BinPatch. There you will get all official releases and authorized patches to upgrade older versions.

1. WWW 

If you are allready reading this page online, just follow the link to the Download-Area, to get to the correspondig WWW-page, else you may enter  

http://binpatch.home.ml.org/index.htm#DownloadBinPatchE

in your brower select your platform there.

2. FTP

The only FTP-Server that offers BinPatch in all versions is ftp.leo.org, but with some delay from the release and in various directories. I plan to have one single server in the near future that serves with all versions of BinPatch.

3. Newsgroups

I post versions of BinPatch to the alt.binary.* newsgroups, but usally I wait to see, if there are problems with new releases before doing it.


8. Distributions

This chapter lists all current English distributions and describes their contents:

- mkpat17d.zip
: BinPatch for DOS/Windows3.1 as InfoZip-file.

Program files
Datei Size(packed)  DOS Windows 3.1   Windows 95 Windows NT OS/2
GENPATCH.EXE k.a. Yes,with a DPMI-Server In DOS-Boxes In DOS-Boxes In DOS-Boxes, but without LFN In DOS-Boxes
DOPATCH.EXE 31k (17k) Yes In DOS-Boxes In DOS-Boxes, but without LFN In DOS-Boxes, but without LFN In DOS-Boxes
DOPAT95.EXE 49k (27k) No In DOS-Boxes In DOS-Boxes Im DOS-Fenster No

Other files:
File Description
README.TXT Short summary of BinPatch in ASCII-format
README.HTM The BinPatch docomentation in HTML-format
REGISTER.EXE Windows program to register BinPatch via
Kagi.
REGISTER.HTM Informations about registration of BinPatch.
REGISTER.TXT A ASCII-textfile, that describes registering
via Kagi.
MINIPNKT.GIF Small image for use in HTML-documentation
BK101.GIF Background for the HTML-dokumentation

- mkpat17n.zip: BinPatch for Windows 95&NT as InfoZip-file.

Program files
Datei Size(packed) DOS Windows 3.1   Windows 95 Windows NT OS/2
GENPATCH.EXE k.a. No No In DOS-Boxes At the command prompt No
DOPAT95.EXE 49k (27k) No In DOS-Boxes In DOS-Boxes At the command prompt No
DOPATCH.EXE 31k (17k) Ja. In DOS-Boxes In DOS-Boxes, but without LFN In DOS-Boxes, but without LFN In DOS-Boxes

Other files as they are in mkpat17d.zip

- mkpat17o.zip: BinPatch for OS/2 V2, Warp3&4 as InfoZip-file.

Program files
Datei Size(packed)  DOS OS/2
GENPATCH.EXE k.a. No In OS/2-Boxes
DOPATCH.EXE 42k (25k) No In OS/2-Boxes

Other files as they are in mkpat17d.zip

- mkpat17e.tgz: BinPatch for Elf-Linux as tgz-file.

Program files
Datei Size(packed) a-out ELF
genpatch k.a. No Yes
dopatch 30k (15k) No Yes

Other files as they are in mkpat17d.zip


9. History

These are the changes from version to version:

V1.7 (8. offical release for DOS, Win95, NT, OS/2 and Linux on 19.6.97)

- A error in the format of the 1.0x patches has been revealed. An assumption about embeddings has shown to be wrong for patches with rather low rates. With very big embeddings when patching files from much smaller files without option "-r" will sometimes cause GenPatch to produce patches, that are refused to apply by DoPatch. This is rare, but unfortunatly happens and requires an immeadiate change in the file format for the patches, so this is the first incompatble version after 7 compatible releases since 1.00.
- The old versions of DoPatch point to a webpage where the new DoPatch kann be downloaded. The new version points to a webpage where the old version can be downloaded, if they encounter patches in the other format.
- The new format now finally contains the filedate of patched and embedded files. But besides DoPatch for DOS/Windows3.1 there is not yet a DoPatch that effectivly does that.

- New parameter "-n" of GenPatch sets the date of all files in that patch to the current date.
- The output of DoPatch has been revised and now fits into a standard 80x25 character window, so the keypress for the usage text has been removed. Also the text now should be easier to understand.
- The English text for unreg. version patches was messed up and has now been fixed.
- The option "-c" has been changed to accept only values in range 10..255 as other values are not usefull and this restrction allowed simplification of DoPatch.
- Both Warp 2 and 3 have received detail enhancements that gain about 1% when there are many embeddings.
- New parameter "-p" allows to modify local behavoiur of BinPatch in anohter aspect as "-l", using it, GenPatch adapts to more or less constant structure of the patch. Default is 190, but lower or hight values may give better results or not.
- New parameter "-b" can dramatically increase packrate of patchfiles treating data that pack very good. These are e.g. texts or helpfiles with a lot smaller changes. In other cases it's no enhancement or will even reduce the results. This parameter will also change only the packrate of patches, but not the filesize of patches.

V1.06 (7. offical release for DOS, Win95, NT, OS/2 and Linux on 17.6.97)

- Fixed a bug in GenPatch. In (rare) cases it would core dump (under Linux) or create patches that are refused by DoPatch.
- DoPatch for Windows 95/NT did not use the appropiate directory for it temporary files. This has been fixed
- Major internal restructuring of DoPatch has begun. The bugfix above is the reason why I enforced this release and delayed the autoscan facility.
- The text for patches created without a keyfile has been changed and is now reads much more positiv.
- The language detection on DOS/Windows3.1 and Win95/NT has been enhanced.

V1.05 (6. offical release for DOS, Win95, NT, OS/2 and Linux on 9.6.97)

- GenPatch now views a progress-meter for Warp 1, which was implemented without any performance loss.
- From this version on, you may specify GenPatch patchnames with or without the ".utp" suffix allready there. Before this, this would result in e.g. "test.utp.utp", which was useless and lead to errors under DOS/Windows3.1 where this is a illegal filename.
- BinPatch now detects the systems language and chooses its' output appropiate. This puts an end to the former two languaged ouput, which may have been a bit confusing sometime. Under Linux you will allways have English. Also all texts are now translated and many have been changed for more ellegance.
- Patches without option "-r" are now created a little faster, but option "-r" has been disabled for reimplementation.
- On a logical error (e.g. a unreadable source file) GenPatch stoped execution with an error, but did not delete the patchfile created so far. Now it does. Interupting GenPatch with CTRL-C will do the same only under DOS/Windows3.1 and Linux so far. I'm doing research for the other platforms now.
- The DoPatches for Win95, OS/2 and Linux are now able to work more than once at a time, which means, you may apply serveral patches at the same time. Only DoPatch for DOS will not do this yet, because it won't be used in Multitasking normally. Anyway, one of it, will coexist with those for Win95 or OS/2 fine. But concurrent patches, have not been tested very much by now, so be carefull.
- Timeout for DoPatch's keypress now works for OS/2 too.

V1.04 (5. offical release for DOS, Win95, NT, OS/2 and Linux on 21.5.97)

- The BinPatch-homepage has moved. Please bookmark only the pointer  http://binpatch.home.ml.org, it will keep address changes transparent for you!
- First English release.
- New naming convention for archives. Allows to code language of releases too.
- Registration can now be done online via credit card at Kagi. You also have an option for the secure SSL protocoll there.
- Registration can also be done starting REGISTER.EXE under Windows. The program will allow you to register via email or normal mail. You may pay using various credit cards, checks, bills and allmost any currency.

V1.03 (4. official release for DOS, Win95, NT, OS/2 and Linux on 3.4.97)

- The OS/2-Version of BinPatch needs no longer a runtime library und is publically released with this version.
- Due to better algorithms at embedding GenPatch creates about 2-5% smaller patches compared to last release. It now optimizes even better for packing of patchfiles.

- This version is still compatible with BinPatch 1.00-1.02.
- The BinPatch-homepage has gotten a new pointer that protects users from possible changes of the address behind it. The new address is http://binpatch.home.ml.org and allways points to the current "real" address of the homepage.
 - The programs now output a new contact-address, that is proposed to be "lifetime" and forwards to my current address. It's KayHayen@bigfoot.com.
- The linux-version has dramatically shrinked in size. The DoPatch is now at 15k packed filesize and about as small as the DOS version. This makes it applicable to put it with patches too.
- Since this version the texts of binpatch-keys may contain special characters like "öäü" or "èéô" and the like. They appear with DoPatch on any platform correctly displayed on the screen.
- The memory usage of GenPatch has been decreased to only 20% now. This increases the filesize that is patchable with the DOS/Windows3.1 version dramatically.
- The speed of GenPatch has been increased by about factor 1.5. You'll only notice this with very big files and much embedding in them, otherwise you won't notice it, due to GenPatch's famous speed.
- Both GenPatch and DoPatch show messages with special characters now.
- A new switch "-f" for GenPatch creates directory-mode patches that force patching of unmodified files too. This makes DoPatch create complete installations when supplying a alternative directory. You may use this, to give endusers an option to cleanup.
- A new enviroment-variable "BINPATCH_OPTS" is considered by GenPatch. It's contents is added to all command lines given to GenPatch. This is meant to give you a place for global options.
- The DoPatch for DOS now recognizes LFN-parameters and patches with too long filenames and points out to DoPat95
- The DoPatch for DOS now has a timeout when waiting for a keypress. (Other platforms will follow soon.)
- Chapter "Distributions" has been added. It lists, what archiv contain what files. Also there has been added a "appendix A" that explains important terms used in this documentation.

V1.02 (3. official release for DOS, Win95, and Linux on 17.2.97) 

- The WWW-pages now allow to get notified on their changes.
- From this version on, BinPatch has all you need to register with it.
- DoPatch can now output the address where to find a suitable DoPatch when it finds patches in newer formats.
- The new parameter "-a" tells GenPatch to work on hidden files too.
- GenPatch now patches files with 0 Bytes, for source or destination..
- The testsuite now covers even more potential bugs.
 

V1.01 (2. official release for DOS, Win95, and Linux on 11.2.97) 

- Reviewed HTML readme file. Uses now colors more appropiate and better formating, which don't look so disturbed. Better background and bigger text.
- The readme file for BinPatch now comes in HTML with patches to create optional text versions.
Later note: These patches are nomore included.
- The usage text of DoPatch has been revised.
- Projekt was renamed. Former name "BinDiff" lead to the assumption, that the program would only list differences. So from now on, it will be called "BinPatch" instead.
- The registration key will also be found, if simply put into GenPatch's directory. This saves valueable space for enviroment variables under DOS.

V1.00 (1. official release for DOS, Win95 and Linux on 5.2.97)

- A "testsuite" helps to check functionality of BinPatch releases. Known bugs of prior versions or know error sources, are checked with patches prior release on all platforms. Features are tested, if they still work, but now this is only true for the default parameters. The "testsuite" will grow in future.
- When building the "testsuite" there were a few optical things enhanced.
- From now on, the WWW presence will be the most recent source for BinPatch.

V0.90 (10. Betaversion for DOS, Win95 and Linux on 31.1.97)

- The check for registration keys has been made more resistent against mistakes.
- Output of DoPatch has been revised to fit in a 80x25 screen.
- Linux version has become a new directory structure that fits into usuall standards.

Sorry, the rest has not yet translated. New releases will get one further former release translated.

V0.89 (9. Betaversion für DOS, Win95 und Linux am 22.1.97)

- Ein in DoPatch.EXE 0.88 eingeschlichener Fehler wurde beseitigt. Der Verzeichnismodus arbeitete nichtmehr korrekt. Das DoPat95.EXE war davon nicht betroffen.
- Ab dieser Version ist BinDiff über das WWW zu beziehen. Es finden sich neben Texten zu BinDiff ein Registrationsformular und jeweils die aktuellste Fassung dieses Textes im HTML-Format.
 

V0.88 (7. Betaversion für DOS, Win95 und Linux am 20.1.97) 

- Der Algorithmus wurde wieder ein wenig verbessert. Für Dateien mit weniger als 64k erzeugt BinDiff jetzt nochmals kleinere Dateien, etwa 1% weniger.
- Die theoretische Grenze für die Dateigröße von patchbaren Dateien von bisher 16M wurde auf 2 Gigabyte angehoben.
- Das DoPat95.EXE reagiert jetzt ebenfalls auf irgendeine Taste anstatt auf einem "<Enter>" zu bestehen.
- Nicht zulässige Registrations-Keys werden im allgemeinen schon von GenPatch erkannt, vorher hätte eine falsche Konfiguration dazu führen können, daß erst DoPatch sich verweigert.
 

V0.87 (6. Betaversion für DOS, Win95 und Linux am 16.1.97) 

- Neue Optionen "-r", "-c" und "-l", um das Patchformat von GenPatch zu kontrollieren
- Der Einsatz von GenPatch als Vorpacker ist jetzt möglich.
 

V0.86 (5. Betaversion für DOS, Win95 und Linux am 14.1.97) 

- GenPatch produziert um ca. 5% kleinere Patches als bisher
- Der Speicherverbrauch von GenPatch wurde auf 60% reduziert
- GenPatch wurde um Faktor 10 schneller, was sich vorallem bei grossen Datei ab 1M lohnt.
- DoPatch kann jetzt auf bestehenden Daten arbeiten
- DoPatch ist nochmals geschrumpft und ist jetzt in der Version für DOS/Windows3.1 gepackt kleiner als 16k.
- DoPatch für Windows 95 kann in dessen DOS-Box lange Dateinamen bearbeiten.
- DoPatch überprüft den Patch auf Beschädigung und meldet diese.
- BinDiff kann registriert werden
- Die DOS, Windows3.1 und Windows 95 Version von BinDiff liegt jetzt als eine ausführbare Datei vor, die beim Ausführen ein Verzeichnis BDIFF anlegt.
 

V0.85 (4. Betaversion für DOS und Linux am 23.12.96) 

- Fehler in der Dokumentation beseitigt
- Grosse Dateien wurden nur bei relativ guter Patchbarkeit bearbeitet. Der Konservatismus wurde da gelockert.
- Das DoPatch ist nochmals einen Tick geschrumpft, jetzt gepackt weniger als 19k.
 

V0.84 (3. Betaversion für DOS und Linux am 19.12.96)

- Neue Plattformen OS/2 und Linux, wobei Linux sehr kleine Programme liefert, das gleiche aber für OS/2 leider noch nicht erreicht wurde, daher noch kein Release. 
- Alle Plattformen kompatibel untereinander
- Nochmals einen Tick kleinere EXEs für DOS
 

V0.83 (2. Betaversion für DOS am 16.12.96) 

- Deutlich kleineres DoPatch, gepackt weniger als 20k 
- GenPatch, gepackt weniger als 34k
- Ausführlichere Fehlermeldungen beider Programme
- Nochmals unfangreichere Dokumentation
 

V0.82 (1. Betaversion für DOS am 11.12.96) 

- Bei Speicherproblemen gibt GenPatch jetzt an, wieviel Speicher gewollt war und verweist auf die Dokumentation.
- Dateien der Länge 0 werden jetzt korrekt gehandhabt
 

Alle frühereren Versionen waren rein interne Alpha-Versionen. 


10. Planed features

V2.00 (Release scheduled for 7/8.97 )

Note: Features allready implemted have been color-coded in green. This way you can see, how far I've come with development. In fact you see my todo list here. Coming releases may have other implementation or set of features as described below.

- From this version on, GenPatch is able to create "bidirectional" patchfiles. Those will allow users to undo patching. The used algorithm will be far better that using two separate patches in filesize of the patch. DoPatch will recognise itself, what direction is applicable and tells users about it.
- This version has a modified patchfile format. DoPatch 1.0x recognizes this and points users to the correct webpage to download the new DoPatch.
- DoPatch knows so-called "authorisations". These file can be used to warn endusers, when applying patches from 3rd persons.
- A progress meter for DoPatch is now there.
- Patches may now rename files after patching. This way directory patches may rename the main exe from Prog10.EXE to Prog11.EXE, if necessary.
- GenPatch produces even smaller files (about 5%)
- You can supply Windows 95 an own icon for BinPatch's UTP-files. After that, double-clicking patchfiles starts DoPatch will the patchfile. Under OS/2 DoPatch and patchfiles have EAs attached, which don't require you anything before double-clicking a patchfile to apply it.

- The "autoscan-mode" of dopatch searchs the destination of a patchfile itself by scanning your harddisks. Thinking of double-clicking patches, this is very usefull.

Somethings missing? A feature you need? An important option? You think one of this is a mistake? You can offer helpfull information ? Just email me! :-)


11. Quickstart guide

The most simple application of BinPatch is to generate a patch from one file to another. Suppose we have two files OLD.EXE and NEW.EXE and you want to create a patch that will allow to transform OLD.EXE into NEW.EXE with DoPatch. 

All you need to supply GenPatch for this job are the both filesname and a third name, which will become the name of the patch generated by BinPatch. Say we call the patch "OLD2NEW". Tip: Of course the name of a patch should explain somehow, what a patch does, which will not be the case, if you call it "UPDATE" or something like that. Prefer things like  "V21_V22". The suffix of the patchfile will allways be ".UTP" and should not be given on the command line. So out example will do with:

GenPatch OLD.EXE NEW.EXE OLD2NEW 

und right away the program starts. Replace OLD.EXE with it's path, if it's not in the current directory, the same applies to NEU.EXE and if you define a path for OLD2NEW, it will be created there.

A typical case for distributing a software package is patching complete directories or directory structures. This does not require something very different. Just give the path of the two directories and name the patchfile to be generated. 

GenPatch OLD_DIR NEW_DIR OLD2NEW 

This will make GenPatch scan NEW_DIR and search for files with the same name in OLD_DIR, which will be handled as above. If a file can't be found, it will be stored into the patchfile and extracted when using DoPatch. All patching information is kept in one file for simplicity. Files that haven't changed will be ignored (if you don't use a special option "-f" to force patching even for these). BTW: The scan includes file found in subdirectories as well. 

To apply a patch you need to tell Dopatch the filename of the patch and what date shall be patched. In the oabove examples this will be OLD.EXE resp. OLD_DIR. Of course both needn't be named exactly this way, but the files found in OLD_DIR (or whatever name it has) need to be the same. The command

DoPatch OLD2NEW.UTP OLD.EXE MIAU.EXE 

would use OLD.EXE and OLD2NEW.UTP to create to new file MIAU.EXE. For a directory-patch would 

DoPatch OLD2NEW.UTP OLD_DIR NEW_DIR

create a directory NEU_DIR (if it doesn't exist) and write to patched data into it. If you want the changes to be applied directly to the old data, you would type  

DoPatch OLD2NEW.UTP OLD_DIR

and the old data would be overwritten with newer one. And if you want to patch the current directory, you would use the ever shorter command

DoPatch OLD2NEW.UTP 

to update the data found in the current directory.

Currently GenPatch offers 4 special options.This is a try to give a short explanation of them:

Use "-r" to allow BinPatch refering to parts of the file allready pictured. This may make sense, but isn't the default. Try it in your concret case, and compare packed filesizes. A generell rule can't be given, as both happens, sometimes the packed patchfile gets larger and sometimes it's smaller. Watchout as the packed filesize of the patch is normally more interesting. Though patches made with "-r" are normally smaller, this says nothing about packing. 

Use "-c" to select the stepsize of parts not found in the newer version of a file. Higher values produce smaller Patches, which could result in larger packed files. Normally you should find the default of 25 quite perfect for program files and might want to experiment with much bigger values for textfiles, because those have much more stable data than program-files. Values above 10000 won't make to much sense.

Use "-l" to specify to range of the local peephole for optimizing embedded parts of newer versions. This value does not influence the size of the patch itself, but in high degree the size of the patch after packing! For programs the default of 245 is quite good, higher or lower value will quickly result in biggen packed patches. The ideal value depends from the file itself and from the packer used. Normally, you shouldn't change it, the only exception are textfiles, where -l2000 will give you better result. Even higher values will give not much better values and make "Warp 3:" of GenPatch very slow.

Note: The directory mode currently takes only one set of parameters for all files patched. GenPatch will someday be able to analyse, which parameters might be best to choose, itself. For this it would be much help, if BinPatch users tell me about their experiments with options -c und -l.

Another note: It seems that 245 and 25 come very close to packers which normally scan about 256 Bytes at a time and leaving this range, will not help the packer anymore. If you find a packer, that scans more Bytes at a time, it would be nice to hear, if there are other values with best results..

Use "-f" to instruct GenPatch to patch file even if they didn't change at all. The information for this will be very short, but has two consequences: First DoPatch will not work without that files. Second DoPatch will copy these files when patching into another directory, so this enables the user to create "clean" installations with only necessary files using such a patch.


12. Tips&Tricks

Tip: If you're patching big files with the DOS/Windows Version of GenPatch, it may occur that the "automatic" DPMI-Service of Windows fails. In this case create a special DOS-Box, edit it's memory settings for DPMI from "automatic" to 32000 or even 65000. Reason: Windows won't give DPMI as need in "automatic" mode, but instead calculate somehow a size from your physical RAM. This may be to less, when patching very big files. (Supplying such high values seems harmless in all aspects, but no guarantue..) If this still seems not enough, then you might try the OS/2 version or the Linux version of BinPatch. They are compatible, but the OS makes it easy to get as much memory as you need. 

Tip: The Enviroment-Var "BINPATCH_OPTS" is scaned by GenPatch and concated to any command line given. Use this to enter parameters like "-f" that you want enabled by default for every patch you do.

Tip: Try to have the same compiler options when compiling programs to be patched. Otherwise you produce unneccessary differences that only make the patchfile bigger.

Tip: The option "-r" will give much better result, if you know that a file has much redudancy (parts of the file occur several times in a similar way) that weren't there in the older versions. The generation of patches is slowed down by this, but some application of this is to patch newsbatches with this option. Very many newsbatches contain questions and answers in it. This can be save much for big newsbatches compare with only packing them. (Remember to unpack them before patching them.)

Tip: If you want to patch text files, then try the options -c2000 and -l5000, which modify the default behaviour of GenPatch. The defaults are optimized to give best result with program file, which is about -c25 und -l245 at the moment. This means that GenPatch optimizes his attempt to prepare embedded data for packing very locally. But this is no use for text files as they allready pack quite excellent and can be handled more generally.

Tip: If you use Windows 95, you should prefer DoPat95.EXE. It is quicker and allows "long filenames", which the normal Dopatch.EXE doesn't.


13. Possible problems. 

When you create patches with the DOS/Windows version of GenPatch, you may see GenPatch terminating with a complaint, that there was not enough memory. See Tips section above for soultions.

The size of patchable files is liimited to 2 gigabytes, but this has not yet been verified. ;-)

When pressing CTRL-C while GenPatch, the "begun" patchfile is not deleted and DoPatch will not accept those incomplete files. Since V1.05 this problem has been solved for GenPatch for DOS/Windows3.1 and Linux. They do know delete the patchfile when interupted. Windows 95/NTand OS/2 version still have that problem, so please take care, if you use them.

All versions of DoPatch can be used several times in paralell except for DoPatch for DOS, which may only run once at a time. But this has not been tested much, so please be carefull

It has been reported that GenPatch for Linux 1.05/6 coredumps after generating the patchfiles. The generated files are OK and can be used! (Strange, I admit) Since I can't test it here myself and 1.7 had to be out quickly, I decided to release it, before I had reports, wether the problem still exists with the new version.


14. Platform specifics 

Windows 95: The "long filenames" introduced in Windows 95 are available in DOS-Boxes, but not in MS-DOS mode. This is a restriction of Windows 95.

Windows NT: Nothing as long as you use the release for Windows 95/NT. If you use GenPatch for DOS/Windows 3.1 with Windows NT, you will not be able to create "long filenames".

Linux: Right now ist Linux the only platform that distinguishes case of filenames. This can lead into trouble, wenn you apply patches generated with a GenPatch for another platform, that doesn't distinguish. If your patchfile is to be applied under Linux and other platforms, consider to generate it with GenPatch for Linux. Future versions of GenPatch will allow to generate patches that don't have these problems.

Also the current Linux-version can't apply patches generate with the option "-r". They can be generated with GenPatch for Linux, but the DoPatch for Linux will tell you that this feature is not yet implemented. 

OS/2: The DoPatch for OS/2 has the same restriction as the Linux-Version concerning option "-r". You cannot apply patches generated with this option, but generate them. This makes use, when you generate patches for DOS with OS/2. The next version of BinPatch should be able to do it.


15. Bugreports 

When you are only applying patches with DoPatch, please ask the creator of the patch! Most problems result from wrong file used to generate or apply patches. No responsible author will distribute patches of which he is unsure, if they really work.

If you find something in BinPatch that is supposed to be a bug, please read the chapters "Platform specifics" and "Possible Problems" to see, if this problem is allready known. Then please look in one of the Sources for BinPatch and see, if the problem has been remove in a possible newer version. 

Then try to reproduce the problem under given circumstances. When patching directories remove all files that are not necessary to reproduce the problem. As lon as the error comes along with a special file, try if a patch of that single file also shows the problem.

If possible for you try out other platforms of BinPatch with the same situation, to see if the problem is related to one special platform. And it would be fantastic, if you tried out older versions of BinPatch in order to see, if the problem is new.

The try to email me with the following informations:

a) What version of BinPatch on what platform are you using?

This information is very important! Knowing this, I can search much more targeted for the source of the problem.

b) What errormessage do you get from GenPatch or  DoPatch? 

This information is also very important! Even if you don't understand it's meaning, it may be a big help for me to see, what in concrete went wrong.

c) What exact parameters did you use?

Also quite important. Many errors may only occur on some problems. (Don't forget to try BinPatch with the defaults!)

d) What did you try to patch ? 

Was a program, picture or text? This may not be important, but it could be. 

Send that mail to  <KayHayen@bigfoot.com> and supply the subject "Bugreport BinPatch Vx.xx" in order to give me a chance to presort messages. PLEASE don't include the binaries immediately. If there is reason for this, I'll ask you for it. Normally there will be no need for it. (Registered users may decide themselves and prepend "REG:" to the subject.) 


16. Thanks to ...

My general thanks go to my brother Andree, who opened internet for me with his site "Edition". Consulting him was often a big support for me and kept me away from many foolish things.

In addition I'd like to thank Matthias Babisch for giving some ideas at startup-time of the project that made BinPatch fast enough to continue my development to a first runable test-version and didn't give up before.

Also thanks to  DJ Delorie and Eli Zaretski. They've given a lot support for 'djgpp' a GNU-Port of gcc for DOS, which was surely a good tool to develop BinPatch.

And last but not least my thanks to all beta testers of BinPatch. Most of all the good ideas in BinPatch come from their critics, here they are in alpabetical order:

Enjoy trying it out! 

Regards, Kay Hayen 

PS: I shall be very thankfull for proposals on content, layout or HTML-code of this documentation. Please help to make it as understandable as possible. Feel free to correct it and sent it to me as email.

Appendix A: Terms

BinPatch: The program package to generate and apply patches. Sometimes you will also find patches made with BinPatch aka UTP-files addressed as a "binpatches".

Compiler: A program being used by developers to generate programs. Normally they include some standard functionality along with every program, which is common for all programs made with the same compiler.

DoPatch: Name of the program to apply patches, part of BinPatch.

DPMI: Technique for DOS-programs to access more memory than DOS normally can. Every DOS-box of Windows or OS/2 has a DPMI-server built-in which programs can access. This is exactly what GenPatch for DOS does needs, you only need to supply a DPMI-Server your own, when want you use pure DOS to generate patches.

GenPatch: Name of the program to generate patches, part of BinPatch.

Long filenames: This is how the new filenames introduced with Windows 95 are called. They needn't conform to the old DOS-conventions. You can have filenames with more than 8 characters, more than one dot within them and any number of characters after dots. Only DoPatch for Windows 95&NT can work with these filenames, but not DoPatch for DOS/Windows3.1.

Patch(datei): A special file (BinPatch normally used the suffix ".UTP" for them, therefore also called UTP-file) that carrys information needed by DoPatch to create a newer version of a file from a older version the patch is related to. As a special feature of BinPatch you may supply a complete directory structure for being patched.

Redundancy: This is how it's called, when information is being repeated in a similar way. For BinPatch there's redundancy when you have a article and a quote of (with '>' or similar) in it, because BinPatch compensates minor changes very good. Such redundancy is not well recognized by modern patchers, but it is, if you enable the option "-r" with BinPatch.

Overhead: Part of  a program that has no function, but is there for technical reasons.


This is page http://binpatch.home.ml.org/readme_e.htm

Copyright © 1997 Kay Hayen. Last changes 19.6.1997. All mentioned names or trademarks are property of the corresponding companys. Responsible is kayhayen@bigfoot.com, Kay Hayen Software, Hamburger Ch.114, 24113 Kiel - Germany.